package com.neighbor.neighborhooduser.dao;

import com.neighbor.neighborhooduser.pojo.ItemCollections;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neighbor.neighborhooduser.pojo.UserItems;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 物品收藏记录表 Mapper 接口
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:13:04
 */
public interface IItemCollectionsDao extends BaseMapper<ItemCollections> {
    Integer isCollect(@Param("user_id")Integer userId,
                      @Param("item_id")Integer itemId);
    Integer collect(@Param("user_id")Integer userId,
                      @Param("item_id")Integer itemId);
    Integer unCollect(@Param("user_id")Integer userId,
                      @Param("item_id")Integer itemId);

    List<UserItems> getCollectionsById(Integer userId);
}
